<?php
declare (strict_types = 1);

namespace app\command;

use app\service\city\CityLogic;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;

class City extends Command
{
    /**
     * 拉取城市
     * 高德地图接口文档：https://lbs.amap.com/api/webservice/guide/api/district/
     * key：7b5126426e263e07885584d43a872d35
     */
    protected function configure()
    {
        // 指令配置
        $this->setName('city')
            ->setDescription('the city command');
    }

    protected function execute(Input $input, Output $output)
    {
//        CityLogic::getInstance()->curlProvinceSub('贵州省');
        CityLogic::getInstance()->curlProvince();
        // 指令输出
        $output->writeln('ok');
    }
}

